<?
 session_start();
 if (@$_SESSION['client']==0) { header('Location: /login.php');};
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>openOli | Dashboard</title>
<link rel="icon" href="img/favicon.png" type="image/png" />
<link href="css/yahoo_reset.css" rel="stylesheet" type="text/css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="css/forms.css" rel="stylesheet" type="text/css" />
<link href="facebox/facebox.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="facebox/facebox.js"></script>
<script type="text/javascript">
  $(document).ready(function(){
        $(".pInfo").mouseover(function() { this.id="pInfoOn"})
        $(".pInfo").mouseout(function() { this.id=""})
        $('a[rel*=facebox]').facebox();
        setInterval ( "updateSide()", 2000 );
        setInterval(function(){$("#timebox").load("time.php");}, 30000);
        })

  function sendQ(){
    s = $('#question').attr('value');
    $.get ("post.php", {msg : s, ch: <? echo $_SESSION['client']; ?>});
    document.getElementById("question").value = '';
    alert('Message Sent!');
   }
</script>
</head>

<body>
  <!-- openOli::Contest | Turan Rustamli -->
  <div id="page">
  
    <div id="hdtext">
	   <div id="hdt_l">open source web based judge for holding olympiads in informatics</div>
	   <div id="hdt_r">English &nbsp; <img src="img/ico_mail.gif" alt="openOli" border="0"> &nbsp; <img src="img/ico_home.gif" alt="openOli" border="0"></div>
	</div>
    
	<div id="header">
	   <div id="logo"><a href="dashboard.php"><img src="img/logo.jpg" alt="openOli" border="0"></a></div>
	   <div id="topmenu">
	        <a class="foxbtn_x" href="dashboard.php"><span>Dashboard</span></a>
	        <a class="foxbtn" href="problems.php"><span>Problems</span></a>
            <a class="foxbtn" href="submit.php"><span>Submit</span></a>
            <a class="foxbtn" href="test.php"><span>Test</span></a>
            <a class="foxbtn" href="archive.php"><span>History</span></a>
            <a class="foxbtn" href="help.php"><span>Help</span></a>
            <a class="foxbtn" href="logout.php"><span>Log out</span></a>
	   </div> 	    
	   <div id="toolbox">		  
		  <div id="timebox">
	          <? include('time.php'); ?>
		  </div>
		</div> 	    
	</div>
	
	<div id="content">
	   <table width="100%" border="0" cellspacing="2">
		<tr>
			<td>
	       <p class="p_title">Profile: <b>&laquo;<? echo $_SESSION['nick']; ?>&raquo;</b></p>
               <div class="pInfo">
                   <? include "contestants/".$_SESSION["nick"].".txt"; ?>
	       </div>
               <br/>
               <div id="stats"><p class="p_title">Stats</p>
			   <ul class="top5">
				     <li><b>A.</b> Loading...</li>
                     <li><b>B.</b> Loading...</li>
                     <li><b>C.</b> Loading...</li>
                     <li><b>D.</b> Loading...</li>
                     <li><b>E.</b> Loading...</li>
               </ul></div>
		<br/>
                        
		  <p class="p_title">Submit a question</p>
	          <p class="p_text">
                  <textarea id="question"></textarea>
                  <input type="submit" value="Submit" id="ok_quest" onclick="sendQ();" />
               </p>		
			</td>
			<td id="sidebar">
			   <div id="msgs"><? include("messages.php"); ?></div>
				<!--
				<p class="p_title"></p>
				<p class="p_text"></p>
				-->
			 </td>
		</tr>
       </table>
	</div>	
	
	<div id="bottom"><span id="b_left">&copy; Turan Rustamli - You may use openOli under the terms of the MIT License.</div></div>	
	<br />
  </div>
</body>
</html>
